The splice() method is a built-in method for JavaScript Array objects. It lets you change the content of your array by removing or replacing existing elements ...
Splicing and Slicing Arrays. The splice() method adds new items to an array. The slice() method slices out a piece of an array. The splice() Method · JavaScript Array Search · Try it Yourself · The unshift() Method